#algoritmo in-and-out